import { BaseController, CoolController } from "@cool-midway/core";
import { Body, Inject, Post } from "@midwayjs/core";
import { ProviderCommentService } from "../../service/comment";
import { ProviderCommentListDTO } from "../../dto/comment";
import { CommentInfoEntity } from "../../../comment/entity/info";

@CoolController({
    api: [],
    service: ProviderCommentService,
    entity: CommentInfoEntity
})
export class AppProviderCommentController extends BaseController {
    @Inject()
    providerCommentService: ProviderCommentService;

    @Post('/overview', { summary: '服务人员综合评分与评论列表' })
    async overview(@Body() body: ProviderCommentListDTO) {
        return this.ok(await this.providerCommentService.overview(body));
    }
}


